<template>
	<PageWrap>
		<view class="content">
			<view class="content-table">
				<uni-table class="table-list" ref="table" :loading="loading" border stripe emptyText="暂无数据"
					style="width:100%; ">
					<uni-tr>
						<uni-th align="center">缺陷类型</uni-th>
						<uni-th align="center">缺陷定义</uni-th>
						<uni-th align="center">缺陷等级</uni-th>
						<uni-th align="center">备注</uni-th>
					</uni-tr>
					<uni-tr>
						<uni-td align="center">磕碰划伤</uni-td>
						<uni-td align="center">多肉/缺肉</uni-td>
						<uni-td align="center">大多数顾客认为比较严重的缺陷，大多数顾客会抱怨产品功能障碍、将导致批量返工的故障</uni-td>
						<uni-td align="center">多肉/缺肉</uni-td>
					</uni-tr>
					<uni-tr>
						<uni-td align="center">磕碰划伤</uni-td>
						<uni-td align="center">多肉/缺肉</uni-td>
						<uni-td align="center">大多数顾客认为比较严重的缺陷，大多数顾客会抱怨产品功能障碍、将导致批量返工的故障</uni-td>
						<uni-td align="center">多肉/缺肉</uni-td>
					</uni-tr>
					<uni-tr>
						<uni-td align="center">磕碰划伤</uni-td>
						<uni-td align="center">多肉/缺肉</uni-td>
						<uni-td align="center">大多数顾客认为比较严重的缺陷，大多数顾客会抱怨产品功能障碍、将导致批量返工的故障</uni-td>
						<uni-td align="center">多肉/缺肉</uni-td>
					</uni-tr>
				</uni-table>
			</view>
			<view class="content-bottom">
				<u-button @click="upperLevel()" size="default" style="margin:0"><u-icon
						name="arrow-left"></u-icon>返回上层</u-button>
				<u-button type="primary" size="default" style="margin:0 40rpx">录入并返回</u-button>
				<u-button type="primary" size="default" style="margin:0" @click="enterGoon()">录入并继续</u-button>
			</view>
		</view>
	</PageWrap>
</template>

<script>
	import PageWrap from "../components/page-wrap/index.vue";
	export default {
		components: {
			PageWrap,
		},
		data() {
			return {
				loading: false,
				setDirty: {
					setDirty: '',
					setDirty1: 1,
					setDirty2: '222222222',
					setDirty3: '333333333',
				}
			}
		},
		computed: {},
		created() {},
		mounted() {},
		methods: {
            // 返回上层
			upperLevel() {
				let pages = getCurrentPages(); // 当前页面
				let beforePage = pages[pages.length - 2]; // 上一页
				// uni.navigateBack({
				// 	success: function() {
				// 		// console.log(beforePage); 
				// 		// beforePage.onLoad(); // 执行上一页的onLoad方法
				// 		// beforePage.$vm.reloadList();
				// 	}
				// })
				uni.navigateBack()
			},
			// 录入并继续
			enterGoon() {
				// console.log(11);
				let setDirty = JSON.stringify(this.setDirty)
				uni.navigateTo({
					url: '/pages/index/reportProductio/repair?setDirty=' + setDirty
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		height: 100%;
		width: 100%;
		background-color: rgb(237, 237, 237);
		padding: 50rpx;

		.content-table {
			height: 90%;
			width: 100%;
			position: relative;

			.table-list {
				// padding: 0 20px;
				position: absolute;
				top: 0;
				width: 100%;
				bottom: 0;
				overflow: auto;
				// margin: 20rpx 0;
				// border: 2rpx solid rgb(193, 193, 193);
				font-size: 30rpx;
			}
		}

		.content-bottom {
			height: 10%;
			width: 100%;
			display: flex;
			justify-content: flex-end;
			align-items: center;
		}
	}
</style>